# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time
  protect_from_forgery # See ActionController::RequestForgeryProtection for details

  before_filter :load_tags, :load_recents


  # Scrub sensitive parameters from your log
  # filter_parameter_logging :password

  private
  def load_tags
    @tags = Tag.all
  end

  def load_recents
    @recents_v = Image.find_recent(0,6, "L")
    @recents_h = Image.find_recent(6,12, "L")
  end
end
